package yzx.common.util;

import java.io.File;

public class FileUtil {

    public static String getSuffix(File file){
        String name = file.getName();
        if(!name.contains(".")) return "";
        return file.getName().substring(name.lastIndexOf(".")+1, name.length());
    }

    public static String getNameWithOutSuffix(File file){
        String name = file.getName();
        if(!name.contains(".")) return name;
        return name.substring(0, name.lastIndexOf("."));
    }

}
